package com.kn.sys.service;

import com.kn.common.model.ActiveUser;
import org.apache.shiro.SecurityUtils;

public abstract class BaseService {
    protected Long getUserId(){
        return getActiveUser().getUser().getId();
    }
    protected ActiveUser getActiveUser(){
        return (ActiveUser) SecurityUtils.getSubject().getPrincipal();
    }
}
